<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>

    </div>
    <script>
        //双重for循环 乘法表
        let num = ''
        for (var i = 1; i < 10; i++) {
            console.log(i);
            for (var j = 1; j <= i; j++) {
                num += j + '*' + i + '=' + i * j + '\t'
            }
            num += '<br>'
        }
        document.write(num)

        for (var i = 0; i < 4; i++) {
            console.log('外层===>', i);
            for (var j = 0; j < 4; j++) {
                console.log('里层=>', j)
            }
        }
        //外层循环控制行里层循环控制列
        let str = '';
        for (var i = 0; i < 5; i++) {
            for (var j = 0; j < 5; j++) {
                str += '⭐' + '\t'
            }
            str += '<br>'
        }
        document.write(str)

        //倒着乘法表
        let numb = ''
        for (var i = 1; i < 10; i++) {
            console.log(i);
            for (var j = i; j < 10; j++) {
                numb += i + '*' + j + '=' + i * j + '\t'
            }
            numb += '<br>'
        }
        document.write(numb)
        let row = prompt('请输入行数');
        let column = prompt('请输入列数');
        let st = ''
        for(var i = 0 ; i< row; i++){
            for(var j = 0; j< column ;j++){
                st += '♥'+'\t'
            }
            st+='<br>'
        }
        document.write(st);
        //倒三角
        let triangle = '';
        for (var i = 0; i < 5; i++) {
            for (var j = i; j < 5; j++) {
                triangle += '♥' + '\t'
            }
            triangle += '<br>'
        }
        document.write(triangle)
    </script>
</body>

</html>